<aside class="sidebar">
  
  {% if page.id %}
  <div class="widget widget-recent">
    <h3 class="widget-title">其他推荐</h3>
    {% for post in site.posts limit:4 %}
    <div class="recent-posts">
      {% if post.image %}
      <div class="recent-header">
        <a class="recent-image" href="{{ root_url }}{{ post.url | prepend: site.baseurl }}" style="background-image: url({{"/img/" | prepend: site.baseurl | append: post.image}})"></a>
      </div>
      {% else %}
      {% endif %}
      <div class="recent-content">
        <h6 class="recent-title"><a href="{{ root_url }}{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a></h6>
        <div class="recent-date">
          <time datetime="{{ post.date | date_to_xmlschema }}">{{post.date | date: "%B %-d, %Y"}}</time>
        </div>
      </div>
    </div>
    {% endfor %}
  </div>
  {% else %}
  {% endif %}

  <div class="widget widget-social">
    <h3 class="widget-title">下单 & 联系我们</h3>
    <ul class="social-profiles list-reset">
      <li class="social-profiles-item">
        <a href="{{site.baseurl}}/about" class="social-profiles-link">淘宝</a>
      </li>
      <li class="social-profiles-item">
        <a href="{{site.baseurl}}/about" class="social-profiles-link">微信</a>
      </li>
    </ul>
  </div>

  <div class="widget widget-tags">
    <h3 class="widget-title">标签云</h3>
    {% capture site_tags %}{% for tag in site.tags %}{{ tag | first }}{% unless forloop.last %},{% endunless %}{% endfor %}{%
    endcapture %} {% assign tag_words = site_tags | split:',' | sort %}
    <ul class="tag-list list-reset">
    {% for item in (0..site.tags.size) %}{% unless forloop.last %}
      {% capture this_word %}{{ tag_words[item] | strip_newlines }}{% endcapture %}
        <li class="tag-item"><a href="{{ site.baseurl }}/tags#{{ this_word | cgi_escape }}" class="tag">{{ this_word }}</a></li>
      {% endunless %}
    {% endfor %}
    </ul>
  </div>
  
</aside>